package com.gcl.kgsvc.service;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class RestService {

    public Map<String, Object> getService(String id) {
        Map<String, Object> map = new HashMap<>();
        map.put("code", 200);
        map.put("msg", "这是一个GET请求的响应。");
        map.put("data", id);
        return map;
    }

    public Map<String, Object> postService(Map<String, Object> data) {
        Map<String, Object> map = new HashMap<>();
        map.put("code", 200);
        map.put("msg", "这是一个POST请求的响应。");
        map.put("data", data.toString());
        return map;
    }
}
